package com.examination.system.instructor.dao.mapper;


import com.examination.system.instructor.dao.BaseMapper;
import com.examination.system.instructor.dao.mysql.BaseDynamicSqlProvider;
import com.examination.system.instructor.dao.mysql.TbStudentEssentialSqlTool;
import com.examination.system.instructor.student.ext.TbStudentEssential;

import org.apache.ibatis.annotations.*;
import org.mapstruct.Mapper;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 寇淇芮
 * @Date 2019/10/15 10:49
 */
@Mapper
@ResponseBody
public interface TbStudentEssentialMapper extends BaseMapper<TbStudentEssential> {
    @Results(id = "studentEsstial",value = {
            @Result(property = "id", column = "id", id =  true),
            @Result(property = "studentNumber", column = "student_number"),
            @Result(property = "national", column = "nation")
    })
    @SelectProvider(type = TbStudentEssentialSqlTool.class,method = "selectJsonById")
    TbStudentEssential selectJsonById(@Param("id") String id);
}
